home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
451-475
/
disk_451
/
liner
/
rexx
/
countlinesandwords.rx
next >
Wrap
Text File
|
1992-05-06
|
752b
|
29 lines
/*Counts the total number of lines and words in the current outline*/
address 'liner'
options results
'totop' /*Go to the top*/
'getlinetext' /*Get the first line of text*/
oldresult = "fwh8i3oihfi"
TotalWords = 0
TotalLines = 0
do until result = oldresult /*Do until the current line and the previous*/
/*match (i.e. cursor couldn't go down; hmmm*/
/*future plan: have cursordown (& up) */
/*return a result*/
TotalLines = TotalLines + 1
TotalWords = TotalWords + words(result)
oldresult = result
'cursordown'
'getlinetext'
end
echo "There were " || TotalLines || " lines."
echo "There were " || TotalWords || " words."